import request from '@/utils/request'
const prePath = '/bidding'

//招标项目参数
export function getParameterPage(params) {
  return request({
    url: prePath + '/parameter/page',
    method: 'get',
    params,
  })
}
export function getParameterAll(params) {
  return request({
    url: prePath + '/parameterDetail/all',
    method: 'get',
    params,
  })
}
export function getParameterById(id) {
  return request({
    url: prePath + '/parameter/' + id,
    method: 'get',
  })
}
export function createParameter(data) {
  return request({
    url: prePath + '/parameter',
    method: 'post',
    data,
  })
}
export function updateParameter(data) {
  return request({
    url: prePath + '/parameter',
    method: 'put',
    data,
  })
}
export function delParameter(data) {
  return request({
    url: prePath + '/parameter',
    method: 'delete',
    data,
  })
}
//招标项目
export function getProjectPage(params) {
  return request({
    url: prePath + '/project/page',
    method: 'get',
    params,
  })
}
export function getProjectAll(params) {
  return request({
    url: prePath + '/projectDetail/all',
    method: 'get',
    params,
  })
}
export function getProjectById(id) {
  return request({
    url: prePath + '/project/' + id,
    method: 'get',
  })
}
export function createProject(data) {
  return request({
    url: prePath + '/project',
    method: 'post',
    data,
  })
}
export function updateProject(data) {
  return request({
    url: prePath + '/project',
    method: 'put',
    data,
  })
}
export function delProject(data) {
  return request({
    url: prePath + '/project',
    method: 'delete',
    data,
  })
}
export function mappingBiddingProjectAssetMappingAsset(data) {
  return request({
    url: prePath + '/mappingBiddingProjectAsset/mappingAsset',
    method: 'post',
    data,
  })
}
export function getMappingBiddingProjectAssetById(id) {
  return request({
    url: prePath + '/mappingBiddingProjectAsset/getProjectAsset/' + id,
    method: 'get',
  })
}
export function getMappingBiddingProjectByAssetIdById(id) {
  return request({
    url: prePath + '/mappingBiddingProjectAsset/getProjectByAssetId/' + id,
    method: 'get',
  })
}
